package com.leadnews;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

@SpringBootApplication
@MapperScan("com.leadnews.mapper")
public class LeadnewsApp {
    public static void main(String[] args) {

        SpringApplication.run(LeadnewsApp.class, args);
    }
    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
//    @Bean
//    public RestTemplate restTemplate(){
//        return new RestTemplate();
//    }
//@Bean
//public RestHighLevelClient client(){
//    return  new RestHighLevelClient(RestClient.builder(
//            HttpHost.create("http://localhost:9200")
//    ));
//}
}
